#define _CRT_SECURE_NO_WARNINGS 1
#include <iostream>
using namespace std;

int main() {

    char str[100] = { 0 };
    cin.getline(str, sizeof(str));
    char t[3];
    int a = 0, b = 0;
    int f = 0, k = 0;
    for (auto i = str; *i != 0; i++) {
        if (*i == ' ') {
            f += 1;
            continue;
        }
        if (f == 0)
            t[k++] = *i;
        if (f == 1)
            a = a * 10 + (*i - '0');
        if (f == 2)
            b = b * 10 + (*i - '0');
    }
    if (*t == 'a' or *t == 'A')
        cout << a + b;
    if (*t == 's' or *t == 'S')
        cout << a - b;
    if (*t == 'm' or *t == 'M')
        cout << a * b;
    if (*t == 'd' or *t == 'D')
        if (b != 0)
            cout << a / b;
        else
            cout << "Error";
    return 0;
}
